﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Data.Entity;
using TrainingWorkshop.Model;
using System.Reflection;
using System.Configuration;
using TrainingWorkshop.DALFactory;
using TrainingWorkshop.IDAL;
using TrainingWorkshop.DAL_EF;
namespace BLL
{
    /// <summary>
    /// Author: Sissi Zeng
    /// Date: 2012-08-08 14:50 
    /// get TeacherList from Fatory
    /// return to UI
    /// </summary>
    public class TeacherBU
    {


        /// <summary>
        /// Constructor
        /// </summary>
        public TeacherBU()
        {

        }


        /// <summary>
        /// get TeacherList from factory
        /// </summary>
        /// <returns></returns>
        public List<TrainingWorkshop.Model.Teacher> GetTeachers() {


            IFactory factory = new ApplicationContext().CreateFactory("EF");

            ITeacherRepository teacherRep = factory.CreateTeacherRepository();
           
            return teacherRep.SelectAll();
        }
    }
}
